home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / internet-tools / connect-line / cl / rexx / cl-setcomment.clrexx < prev    next >
Encoding:
Text File  |  1996-02-05  |  2.6 KB  |  104 lines

  1. /*
  2. **  $VER: CL-SetComment.clrexx 1.4 (05 Feb 1996)
  3. **
  4. **        © 1995-96 Ralf Ramge
  5. **
  6. **  PROGRAMNAME:
  7. **      CL-SetComment.clrexx
  8. **
  9. **  FUNCTION:
  10. **      Demonstrationsskript zur cl_rexx.library, Connectline 5.0
  11. **
  12. **      Connectline © 1986-1995 Oliver Wagner, Mathias Mischler
  13. **      cl_rexx.library © 1995 Mathias Mischler
  14. **
  15. **      Dieses Skript liest Brettlisten von Connectline 5.0 (genauer
  16. **      gesagt 'Re: LIST BRETTER VERBOSE') und Checkgroups ein und
  17. **      ergänzt im eigenen System nicht vorhandene Brettkommentare
  18. **      mit denen aus der Liste.
  19. **
  20. */
  21.  
  22. file=arg(1)
  23.  
  24. /* rexxsupport.library öffnen */
  25.  
  26. if ~show('L','rexxsupport.library') then do
  27.     if ~addlib('rexxsupport.library',0,-30,0) then exit 10
  28.     end
  29.  
  30. if ~show('L','cl_rexx.library') then do
  31.     if ~addlib('cl_rexx.library',0,-30,0) then exit 10
  32.     end
  33.  
  34.  
  35.  
  36. /* Fontsize ermitteln */
  37.  
  38. gfxbase=showlist(l,'graphics.library',0,a)
  39. call forbid
  40. FontAddress=next(gfxbase,154)
  41. Fontsize=c2d(IMPORT(offset(FontAddress,20),2))
  42. call permit
  43. windowwidth=Fontsize*40
  44. windowheight=Fontsize*15
  45. windowY=Fontsize+1
  46. WindowX=Fontsize
  47.  
  48. /* Standard-IO umleiten */
  49.  
  50. screen=CLGET_FrontScreenName()
  51. call close STDOUT
  52. if ~open(STDOUT,'CON:'windowX'/'windowY'/'windowwidth'/'windowheight'/CL-SetComment/SCREEN'screen,'W') then
  53.     exit 20
  54. else do
  55.     call close STDIN
  56.     call open STDIN,'*',R
  57.     call pragma '*'
  58.     end
  59.  
  60. if file='' then do
  61.     say "Name und Pfad der Quell-Brettliste :"
  62.     file=CLGET_FileRequest()
  63.     end
  64.  
  65. if file='' then ende
  66.  
  67. if ~open('in',file,'R') then do
  68.     say 'Quell-Brettliste konnte nicht gefunden werden!'
  69.     call ende
  70.     end
  71.  
  72. do until eof('in')
  73.     line=readln('in')
  74.     if line~='' then do
  75.         if left(line,1)='/' then line=right(line,length(line)-1)
  76.  
  77. /* Wer jetzt die Lesbarkeit bemängelt, wird erschossen ;) */
  78.  
  79.         select
  80.             when CLGET_BoardAbout(word(line,1))='' then CLSET_BoardAbout(upper(translate(word(line,1),'/','.')),strip(substr(line,length(brett)+1,length(line))))
  81.             when CLGET_BoardAbout(word(line,1))='Neues Brett' then CLSET_BoardAbout(upper(translate(word(line,1),'/','.')),strip(substr(line,length(brett)+1,length(line))))
  82.             when word(CLGET_BoardAbout(word(line,1)),1)='Autoeintrag' then CLSET_BoardAbout(upper(translate(word(line,1),'/','.')),strip(substr(line,length(brett)+1,length(line))))
  83.             otherwise nop
  84.             end
  85.        end
  86.     end
  87.  
  88. call close 'in'
  89.  
  90. call CL_LogAdd(0,'SETCOMMNT','Brettkommentare neu erstellt')
  91. say 'Speichere Brettliste.'
  92.  
  93. call CL_SaveBoardList()
  94. say 'Fertig.'
  95.  
  96. ende:
  97.  
  98. options prompt "<Bitte drücken Sie RETURN>"
  99. pull dummy
  100.  
  101. call close STDOUT
  102. call close STDIN
  103. exit
  104.